<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Vermouth</title>
		<link rel="stylesheet" href="style/base.css" type='text/css'/>
		<link rel="stylesheet" href="style/menu.css" type='text/css'/>
		<link rel="stylesheet" href="style/tablesorter.css" type='text/css'/>
		<link rel="stylesheet" href="style/gridnav.css" type='text/css'/>
		<link rel="stylesheet" href="style/page.css" type='text/css'/>
		<link rel="stylesheet" href="style/ticket.css" type='text/css'/>
	</head>
	<body>
		<script src="javascript/jquery.min.js" type="text/javascript"></script>
		<script src="javascript/jquery.tablesorter.min.js" type="text/javascript"></script>
		<script src="javascript/boto_web/pages.js" type="text/javascript"></script>
		<script src="javascript/boto_web/boto_web.js" type="text/javascript"></script>
		<!-- Menu -->
		<div id="topmenu">
			<ul class="left">
			</ul>

			<ul class="right">
				<li id="my_username"></li>
				<li id="myaccount"><a href="#/account">My Account</a></li>
			</ul>
			<br style="clear: both;"/>
		</div>
		<!-- End Menu -->

		<!-- Pages -->
		<div id="maincontent">
			<div id="home" class="page">
				<center>
					<h1>Vermouth</h1>
					<p>Vermouth was created to solve communication issues that exist between developers, customers, and management.</p>
					<img src="images/tree_swing_development_requirements.jpg"/>
				</center>
			</div>
			<!--#include virtual="pages/projects.html"-->
			<!--#include virtual="pages/tickets.html"-->
		</div>
		<!-- /Pages -->

		<script>
			$("table.tablesorter").tablesorter({widgets: ['zebra'], headers: { 0: {sorter: false}}});
			$(".require_employee").hide();
			var env = new boto_web.Environment("data", function(env){
				$("li#my_username").html("<b>" + env.user.username + "</b>");

				// Set up the menu according to what permissions we have
				var menu = $("div#topmenu ul.left");
				menu.append("<li><a href='#/home'>Home</a></li>");
				menu.append("<li><a href='#/projects'>Projects</a></li>");
				menu.append("<li><a href='#/tickets'>Tickets</a></li>");
				if($.inArray("admin", env.user.auth_groups) != -1){
					menu.append("<li><a href='#/clients'>Clients</a></li>");
					menu.append("<li><a href='#/admin'>Admin</a></li>");
				}
				if($.inArray("employee", env.user.auth_groups) != -1){
					$(".require_employee").show();
				}
				$("div#topmenu a").click(function(){
					loadPage($(this).attr("href"));
					return false;
				});

				if(window.location.hash == ""){
					window.location = "#/home";
				}
				setPage(window.location.hash);
			});
		</script>

	</body>
</html>
